package com.x.client.bean

import android.os.Parcelable
import com.google.gson.annotations.SerializedName
import kotlinx.android.parcel.Parcelize

/**
 *  Creator : GG
 *  Time    : 2017/11/22
 *  Mail    : gg.jin.yu@gmail.com
 *  Explain :
 */
@Parcelize
data class Shop(
        @SerializedName("market") var market: Market? = Market(),
        @SerializedName("marketId") var marketId: String? = "", //1
        @SerializedName("shopAddress") var shopAddress: String? = null, //三元桥
        @SerializedName("shopCreateTime") var shopCreateTime: Long? = 0, //1508831089000
        @SerializedName("shopId") var shopId: String? = "", //17102415444936682389306510396702
        @SerializedName("shopLegalMobile") var shopLegalMobile: String? = "", //18642325068
        @SerializedName("shopLegalName") var shopLegalName: String? = "", //氪荆
        @SerializedName("shopLegalNo") var shopLegalNo: String? = "", //149898989898989888
        @SerializedName("shopMobile") var shopMobile: String? = "", //15898293823
        @SerializedName("shopName") var shopName: String? = "", //车行店铺
        @SerializedName("shopState") var shopState: Int? = 0, //1
        @SerializedName("shopAuctionState") var shopAuctionState: Int? = 0, //1
        @SerializedName("shopUpdateTime") var shopUpdateTime: Long? = 0, //1510288619000
        var status: Boolean = false
) : Parcelable {

    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false

        other as Shop

        if (shopId != other.shopId) return false

        return true
    }

    override fun hashCode(): Int {
        return shopId?.hashCode() ?: 0
    }

}
